home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / adikit.arc / DUAL.LSP < prev    next >
Encoding:
Lisp/Scheme  |  1986-12-01  |  7.8 KB  |  254 lines

  1.  
  2. ; start it up
  3. (dssetup)
  4. (setq wtime 2000)
  5. (print "                                     ")
  6. (print "* * * DUAL SCREEN display tests * * *")
  7. (print "                                     ")
  8.  
  9. ; open test result output file...name NNNdisp.lay
  10. (setq testfn (strcat disp8 "." status comnd menu))
  11. (startestout testfn)
  12.  
  13. (terpri)
  14. (print "When the command prompt is only one line or is configured OFF,")
  15. (print "test questions will be asked from the TEXT screen.")
  16. (print "So, if you need to look at the graphics screen again, ")
  17. (print "or the text screen, use flipscreen BEFORE answering the question")
  18. (terpri)
  19. (print "Yes/No questions must be answered with 'y' 'Y' 'n' or 'N'")
  20. (print "Any other response will result in the prompt being repeated")
  21. (terpri)
  22. (print "When a prompt says Hit RETURN, you can only continue by")
  23. (print "depressing the RETURN key")
  24. (terpri)
  25. (print "* * Hit RETURN when ready to go * *")
  26. (getstring cr)
  27.  
  28. ; the first test should check that config of status, comnd and menu worked
  29.  
  30. (if (= "Y" comnd) (graphscr) (textscr))
  31.  
  32. (starttest "First check configuration of COMMAND prompt area")
  33. (if (= "Y" comnd)
  34.     (getrslt "There is a COMMAND prompt area, right? ")
  35.     (getrslt "There is NO Command Prompt Area, correct? "))
  36. (starttest "Next, check for STATUS LINE")
  37. (if (= "Y" status)
  38.     (getrslt "There is a STATUS LINE, right? ")
  39.     (getrslt "There is NO Status line, correct? "))
  40. (starttest "Finally, check for MENU AREA")
  41. (if (= "Y" menu)
  42.     (getrslt "There is a MENU AREA, right? ")
  43.     (getrslt "There is NO Menu area, correct? "))
  44.  
  45. (textscr)
  46. (terpri)
  47. (print "The BORDER tests start by drawing a pline around the dwg area border")
  48. (print "then messing around with it and asking if all is ok.")
  49.  
  50. (starttest "The first step DRAWs a PLINE on the edges of the drawing area.")
  51. ; draw the pline and ask about it
  52. ; assume 0,0 is at lower right of screen so viewctr can be used to
  53. ; compute the corners (2 times x and y values of viewctr)
  54. (setq ctrpt (getvar "viewctr"))
  55. (setq x (car ctrpt))
  56. (setq y (cadr ctrpt))
  57. (setq x (* 2 x))
  58. (setq y (* 2 y))
  59. (command "pline" '(0 0)  "w"  0  0          
  60.                  (list x 0)
  61.                  (list x y)
  62.                  (list 0 y) 
  63.                  (list 0 0) 
  64.                  ctrpt
  65.                   ""
  66. )
  67. (getrslt "Did the PLINE cover the graphics screen edges? ")
  68.  
  69. ;flip to graphics and back to text - ask if all is ok
  70. (terpri)
  71. (starttest "Now, check that FLIPSCREEN does not do anything.")
  72. (textscr)
  73. (wait wtime)
  74. (graphscr)
  75. (getrslt "Flip screen had no effect on the graphics screen, correct? ")
  76.  
  77. ; and one more question...did textscreen leave all that text around?
  78. (starttest "Make sure that the TEXTSCREEN has a screen full of test")
  79. ; make sure we go to textscreen always!
  80. (textscr)                  
  81. (wait wtime)
  82. (getrslt "Does the TEXT screen show the correct # of LINES? (a screen full)")
  83.  
  84. ;make sure GRID works
  85. (starttest "Make sure GRID works")
  86. (command "GRID" "on")
  87. (getrslt "Did the GRID come on? ")
  88.  
  89. (starttest "Now let's turn GRID off")
  90. (command "GRID" "off")
  91. (getrslt "Did the GRID turn off? ")
  92.  
  93. ;turn the axis on. ask if all is ok
  94. (starttest "Now, check that AXIS ON works ok")
  95. (command "axis" ".5")
  96. (getrslt "Did the axis show up correctly? ")
  97.           
  98. ;change the axis spacing...
  99. (starttest "Next, check that changed axis spacing doesn't leave old ticks")
  100. (wait 1000)
  101. (command "axis" "2.2")
  102. (getrslt "Did the old axis ticks go away, and only the new ones appear? ")
  103.  
  104. ;turn the axis off. ask if all is ok
  105. (starttest "Now, check that AXIS OFF works ok")
  106. (command "axis" "off")
  107. (getrslt "Did the axis go away correctly? ")
  108.  
  109. ;make sure erase highligts the pline. but cancel the erase 
  110. ;we need the pline for later.
  111. (starttest "Next, check that the PLINE HIGHLIGHTS when erased.")
  112. (command "erase"  "l" (slowpick))
  113. ; cancel before its done
  114. (command) 
  115. (getrslt "Did the PLINE HIGHLIGHT? ")
  116.  
  117. ;make sure erase works
  118. (starttest "Next, fully ERASE the PLINE (we won't cancel the erase)")
  119. (command "erase" "l" "")
  120. (getrslt "Did the PLINE, and only the pline, ERASE completely? ")
  121.  
  122. ;make sure oops works...
  123. (starttest "Make sure OOPS brings the PLINE back")
  124. (command "oops")
  125. (getrslt "Did the whole PLINE re-appear? ")
  126.  
  127. ;make the pline into a wide pline
  128. (starttest "Now, let's make a WIDE PLINE.")
  129. (graphscr)
  130. (wait 200)
  131. (command "pedit"  "l" "w" "1" "")
  132. (getrslt "Does the WIDE PLINE show up properly? ")
  133.  
  134. (starttest "Next check that the WIDE PLINE HIGHLIGHTS correclty")
  135. (command "erase" "l" (slowpick))
  136. (command)
  137. (getrslt "Did the WIDE PLINE HIGHLIGHT completely? ")
  138.  
  139. (starttest "Next check that the WIDE PLINE ERASEs completely.")
  140. (command "erase" "l" "")
  141. (getrslt "Did the WIDE PLINE ERASE completely, without erasing other stuff? ")
  142.  
  143. ;now lets check highlighting of a wide pline drawn on top of it self...
  144. (starttest "Next check that a WIDE HORIZONTAL PLINE drawn back on itself HIGHLIGHTS ok")
  145. (command "pline" (getvar "viewctr") "w" "1" "1" "@4<0" "@2<180" "")
  146. (wait 200)
  147. (command "erase" "l" (slowpick))
  148. (command)
  149. (getrslt "Did the pline highlight properly? ")
  150.  
  151. (command "erase" "l" "")
  152.  
  153. (starttest "Now check that wide arced plines (DONUTs) DRAW correctly")
  154. ; use donut command....
  155. (setq x (* 2 (car ctrpt)))
  156. (setq y (* 2 (cadr ctrpt)))
  157. (setq id (/ (getvar "viewsize") 2))
  158. (setq od (min x y))
  159. (command "donut" id od ctrpt "")
  160. (getrslt "Did the DONUT draw properly? ")
  161.  
  162. (starttest "Now check that the DONUT HIGHLIGHTS completely")
  163. (command "erase" "l" (slowpick))
  164. (command)
  165. (getrslt "Did the DONUT HIGHLIGHT completely? ")
  166.  
  167. (starttest "And now let's check if the DONUT ERASEs completely")
  168. (command "erase" "l" "")
  169. (wait wtime)
  170. (getrslt "Did the DONUT ERASE completely? ")
  171.  
  172. ;now make sure redraw doesn't mess things up
  173. (starttest "Let's put the PLINE and DONUT back, then do a REDRAW")
  174. ;put the donut back
  175. (command "oops")
  176. (wait 200)
  177. ;put the pline in
  178. (setq ctrpt (getvar "viewctr"))
  179. (setq x (car ctrpt))
  180. (setq y (cadr ctrpt))
  181. (setq x (* 2 x))
  182. (setq y (* 2 y))
  183. (graphscr)
  184. (command "pline" (list 0 0) 
  185.                  (list x 0)
  186.                  (list x y)
  187.                  (list 0 y) 
  188.                  (list 0 0) 
  189.                   ctrpt ""
  190. )
  191. (wait 200)
  192. (print "REDRAW")
  193. (wait 200)
  194. (command "redraw")
  195. (getrslt "Did the REDRAW work correctly? ")
  196.  
  197. ;make sure regen works to...
  198. (starttest "Now we'll to a REGEN")
  199. (command "regen")
  200. (getrslt "Did the REGEN work ok? ")
  201.  
  202. ;get rid of the pline  and the donut
  203. (command "erase" "l" "")
  204. (command "erase" "l" "")
  205.  
  206. ; check status line with SNAP, ORTHO
  207. (if (= "Y" status)
  208.     (progn
  209.     (starttest "Check STATUS line after SNAP, ORHTO on")
  210.     (command "snap" "on")
  211.     (wait 250)
  212.     (command "ortho" "on")
  213.     (getrslt "Did SNAP, ORTHO get set in status line? ") 
  214.  
  215. ; get rid of them
  216.     (starttest "Turn off SNAP and ORTHO")
  217.     (command "snap" "off")
  218.     (wait 250)
  219.     (command "ortho" "off")
  220.     (getrslt "Did SNAP and ORTHO get taken out of status line? ")
  221.  
  222. ; check that layer shows up in the status line
  223.     (starttest "Change the LAYER.  Does the status line show the layer? ")
  224.     (command "layer"  "new" "new" "set" "new" "")
  225.     (getrslt "Did Layer 'NEW' show up in status line? ")
  226.     (command "layer"  "s" "0")
  227.     (command)
  228.     )  
  229. ; end that progn
  230.     )
  231. ; and that if
  232.  
  233. ; if prompt area
  234. (if (= "Y" comnd)
  235.     (progn
  236.     ;check a long prompt like pline
  237.     (starttest "Now check that a long prompt fits in the command prompt area")
  238.     (prompt "This is a line prompt line that should fit in the prompt area")
  239.     (getrslt "Did the long prompt fit in the command prompt area? ")
  240.  
  241. ; end that progn of if prompt area
  242.     )
  243. ; and that if
  244.     )
  245.  
  246. ;!!!!!! now make sure zoom w doesn't mess anything up
  247. ;draw some horizontal lines on right hand side of screen
  248. ;and zoom in on them...this is only meaningful for menu area off?
  249.  
  250.  
  251. ; INTERACTIVE TESTS:
  252. (load "int")
  253.  
  254.